package com.syni.mdd.yhd.common.all.controller.protect.business;

/**
 * @className BmsBusinessController
 * @description TOO
 * @Author cfx
 * @DATE 2019/4/15 14:25
 * @VERSION 1.0
 **/

import com.syni.mdd.sjb.common.component.utils.common.annotations.CheckParams;
import com.syni.mdd.yhd.common.all.service.BmsBusinessinfoService;
import com.syni.mdd.sjb.common.component.utils.common.utils.ParamsMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/businessInfo")
public class BmsBusinessInfoController {
    @Autowired
    BmsBusinessinfoService bmsBusinessinfoService;

    /**
     * @Description 支付宝信息确认
     * @Author: cfx
     * @Date: 2019/9/18
     */
    @PostMapping("/payConfirm")
    @CheckParams(checkAuth = true,params = {"businessInfoId"})
    public Map<String,Object> payConfirm(@RequestBody ParamsMap paramsMap){
        return bmsBusinessinfoService.payTreasureConfirm(paramsMap);
    }


    @PostMapping("/addAlipayInfo")
    @CheckParams(checkAuth = true)
    public Map<String,Object> createAlipayInfo(@RequestBody ParamsMap paramsMap){
        return bmsBusinessinfoService.createAlipay(paramsMap);
    }

    @PostMapping("/getAlipayInfo")
    @CheckParams(checkAuth = true)
    public Map<String,Object> getAlipayInfo(@RequestBody ParamsMap paramsMap){
        return bmsBusinessinfoService.getAlipayInfo(paramsMap);
    }
}
